( echo Relinking raw image for mac arm && \
$(CC) \
$$(otool -l $@ | bin/mac_arm_relink ps=$(SEGMENT_ALIGNMENT_BITS) base=$(TEXT_BASE)) \
- $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS))
+ $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS) && \
+ ("$$(printf '%s\n1167\n' $$(ld -v 2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1) | sort -V |head -n 1)" != "1167" || \
+ ( printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
+ codesign -s - --force $@ )))
unixport/gcl_cmpnopt_gcl_gprof.lsp unixport/gcl_cmpnopt_ansi_gcl_gprof.lsp:\
unixport/gcl_cmpnopt_%_gprof.lsp: unixport/gcl_cmpnopt_%.lsp
( echo Relinking raw image for mac arm && \
$(CC) \
$$(otool -l $@ | bin/mac_arm_relink ps=$(SEGMENT_ALIGNMENT_BITS) base=$(TEXT_BASE)) \
- $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS))
+ $(AM_LDFLAGS) -rdynamic $(LDFLAGS) -o $@ $(FF) $< $(LF) $(LIBS) && \
+ ("$$(printf '%s\n1167\n' $$(ld -v 2>&1 | head -n 1 | awk '{print $$2}' | cut -f2 -d: | cut -d- -f2 | cut -d\. -f1) | sort -V |head -n 1)" != "1167" || \
+ ( printf '\x00\x00\x00\x00\x01\x00\x00\x00' | dd of=$@ bs=1 seek=64 conv=notrunc && \
+ codesign -s - --force $@ )))
unixport/gcl_cmpnopt_gcl_gprof.lsp unixport/gcl_cmpnopt_ansi_gcl_gprof.lsp:\
unixport/gcl_cmpnopt_%_gprof.lsp: unixport/gcl_cmpnopt_%.lsp
#Support libboot option
AC_ARG_ENABLE([saved_pre_image_span],[ --enable-saved_pre_image_span=0x.... set address span for saved pre images],
- [SAVED_PRE_IMAGE_SPAN=$enableval],[SAVED_PRE_IMAGE_SPAN=0x100000000])
+ [SAVED_PRE_IMAGE_SPAN=$enableval],[SAVED_PRE_IMAGE_SPAN=0xFFF00000])
AC_DEFINE_UNQUOTED(SAVED_PRE_IMAGE_SPAN,$SAVED_PRE_IMAGE_SPAN,[address span for saved pre images])
AC_ARG_ENABLE([saved_image_span],[ --enable-saved_image_span=0x.... set address span for saved images],
(in-package :fpe)
(import 'si::(disassemble-instruction feenableexcept fedisableexcept fld *fixnum *float *double
- fetestexcept feclearexcept
+ fetestexcept feclearexcept address
*fixnum *ushort *uint fun-name
si-class-direct-subclasses si-class-name si-find-class
+fe-list+ +mc-context-offsets+ floating-point-error
#.`(let ((fpe-enabled 0)(fpe-set 0))
#+no-sigfpe
- (defun flush-floating-point-exceptions nil
+ (defun flush-floating-point-exceptions (name args &optional (fun (symbol-function name)))
(let ((x (fetestexcept fpe-set)))
(unless (zerop x)
(feclearexcept x)
- (floating-point-error x 0 0))))
+ (floating-point-error x (list* fun "unknown" name args) 0))))
(defun break-on-floating-point-exceptions
(&key suspend no-flush
,@(mapcar (lambda (x) `(,(car x) (logtest ,(caddr x) fpe-enabled))) +fe-list+)
:initial-value nil)
'arithmetic-error))
-(defun floating-point-error (code addr context)
+(defun floating-point-error (code addr context &aux (l (listp addr)))
(break-on-floating-point-exceptions :suspend t :no-flush t)
(restart-case
(unwind-protect
- (let* ((fun (function-by-address addr))(m (read-instruction addr context)))
- ((lambda (&rest r) (apply 'error (if (find-package :conditions) r (list (format nil "~s" r)))))
+ (let* ((fun (if l (pop addr) (function-by-address addr)))
+ (m (if l addr (read-instruction addr context)))
+ (addr (if l (address fun) addr)))
+ ((lambda (&rest r)
+ (apply 'error (if (find-package :conditions) r (list (format nil "~s" r)))))
(code-condition code)
- :operation (list :insn (pop m) :op (pop m) :fun fun :addr addr) :operands m :function-name (when fun (fun-name fun))))
+ :operation (list :insn (pop m) :op (pop m) :fun fun :addr addr)
+ :operands m
+ :function-name (when fun (fun-name fun))))
(break-on-floating-point-exceptions :no-flush t))
- (continue nil :report (lambda (s) (format s "Continue disabling floating point exception trapping"))
- (apply 'break-on-floating-point-exceptions
- :no-flush t
- (mapcan (lambda (x) (list x nil))
- (break-on-floating-point-exceptions :no-flush t))))))
+ (continue nil
+ :report (lambda (s) (format s "Continue disabling floating point exception trapping"))
+ (apply 'break-on-floating-point-exceptions
+ :no-flush t
+ (mapcan (lambda (x) (list x nil))
+ (break-on-floating-point-exceptions :no-flush t))))))